﻿using CCWin;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Win.CSkin.Test
{
    public partial class UserInfo : CCSkinMain
    {
        public T_EmployeeInfo SelEmp = new T_EmployeeInfo();

        public UserInfo()
        {
            InitializeComponent();

            ul1.User_ID = "12345678";
            ul1.User_Name = "小红";
            ul1.User_PYCode = "xiaohong";
            ul1.User_Login = true;
            ul1.User_Sex = Enum_UI.UserSex.女;
            ul1.UserLogoutClick += UL_UserLogoutClick;

            ul2.User_ID = "87654321";
            ul2.User_Name = "李雷";
            ul2.User_PYCode = "lilei";
            ul2.User_Login = true;
            ul2.User_Sex = Enum_UI.UserSex.男;
            ul2.UserLogoutClick += UL_UserLogoutClick;

        }

        private void UL_UserLogoutClick(object sender, EventArgs e)
        {
            try
            {
                this.SelEmp.Em_ID = ((UC_UserLogin)sender).User_ID;
                this.SelEmp.Em_Name = ((UC_UserLogin)sender).User_Name;
                this.SelEmp.Em_NamePYcode = ((UC_UserLogin)sender).User_PYCode;
                this.SelEmp.Em_Sex = ((int)((UC_UserLogin)sender).User_Sex).ToString();
                this.SelEmp.LoginStatus = true;
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            catch (Exception)
            {

            }
        }

    }
}
